import React from 'react';
import { StyleSheet, View, Text, Button } from 'react-native';

export default class ButtonTest extends React.Component {
  constructor(props) {
    super(props)
    this.state = {
      num: 0
    }
  }

  render() {
    let {num} = this.state

    return (
      <View>
        <Text>click change : {num}</Text>
        <Button title="click ++" onPress={() => {this.setState({num: ++num})}}></Button>
      </View>
    );
  }
}